<template>
  <div class="evaluatedetail">
    <Title></Title>
    <div class="evaluate_box">
      <div class="inner">
        <div class="evaluate_tit" @click="starfn()">
          订单评价详情
        </div>
        <div class="evaluate_star">
          <img :src="[user.avatarUrl]" alt="">
          {{user.name}}
          <span class="star">综合评分</span>
          <el-rate v-model="evaluateinfo.user_score"></el-rate>
        </div>
        <div class="evaluate_time">{{evaluateinfo.create_time}}</div>
        <div class="evaluate_upload" v-if="evaluateinfo.images!=null">
          <img v-for="(item,index) in evaluateinfo.images" :src="[item]" alt="" srcset="">
        </div>
        <div class="evaluate_area">
              {{evaluateinfo.content}}
        </div>
      </div>
    </div>

  </div>
</template>

<script>
  import {evaluateinfoapi} from "../../api/http.js"
  import Title from "../../components/title.vue"
  export default {
    name: 'evaluatedetail',
    components: {
      Title
    },
    data(){
      return{
        evaluateinfo:[],
        user:[]
      }
    },
   async created() {
      const res =await evaluateinfoapi(this.$route.query)
      console.log(res.data.data);
      if (res.data.code===200) {
        this.evaluateinfo=res.data.data
        this.user= res.data.data.user
      } else{
        this.evaluateinfo=[]
      }
    }
  }
</script>

<style lang="less">
  .evaluate_box {
    width: 100%;

    .inner {
      width: 1300px;
      margin: 0 auto;
      padding: 10px 85px 70px 85px;
      box-sizing: border-box;

      .evaluate_tit {
        font-weight: 400;
        font-size: 16px;
        line-height: 40px;
        height: 40px;
        margin-bottom: 10px;

      }
      .evaluate_time{
        height: 40px;
        line-height: 40px;
        font-size: 14px;
          margin-bottom: 10px;
      }
      .evaluate_upload {
        width: 100%;
        margin-bottom: 20px;
        display: flex;
        justify-content: flex-start;
        img{
          width: 120px;
          height: 120px;
          margin-right: 10px;
        }
      }
      .evaluate_star {
        width: 100%;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        height: 40px;
        font-size: 14px;
        margin-bottom: 20px;
        img{
          width: 40px;
          height: 40px;
          border-radius: 50%;
          margin-right: 20px;
        }
        .star {
          margin:0 20px;
        }
      }

      .evaluate_area {

      }
    }
  }
</style>
